import {adminUrl} from "@/utils/baseUrl.js"
import request from '@/utils/request'

// 创建教室功能
export function createClassroomFunction(data) {
  return request({
    url: adminUrl + '/collegebase/classroom-function/create',
    method: 'post',
    data: data
  })
}

// 更新教室功能
export function updateClassroomFunction(data) {
  return request({
    url: adminUrl + '/collegebase/classroom-function/update',
    method: 'put',
    data: data
  })
}

// 删除教室功能
export function deleteClassroomFunction(id) {
  return request({
    url: adminUrl + '/collegebase/classroom-function/delete?id=' + id,
    method: 'delete'
  })
}

// 获得教室功能
export function getClassroomFunction(id) {
  return request({
    url: adminUrl + '/collegebase/classroom-function/get?id=' + id,
    method: 'get'
  })
}

// 获得教室功能分页
export function getClassroomFunctionPage(query) {
  return request({
    url: adminUrl + '/collegebase/classroom-function/page',
    method: 'get',
    params: query
  })
}

// 导出教室功能 Excel
export function exportClassroomFunctionExcel(query) {
  return request({
    url: adminUrl + '/collegebase/classroom-function/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
